Skip to content

chore(deps): bump OpenZeppelin 5.6.1 → 5.7.0 — only the wrapped vault's bytecode moves - #300

Open
thedavidmeister wants to merge 3 commits into
mainfrom
chore/bump-oz-5-7-0
Open

chore(deps): bump OpenZeppelin 5.6.1 → 5.7.0 — only the wrapped vault's bytecode moves#300
thedavidmeister wants to merge 3 commits into
mainfrom
chore/bump-oz-5-7-0

Conversation

@thedavidmeister

@thedavidmeister thedavidmeister commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

What

Bumps @openzeppelin-contracts and @openzeppelin-contracts-upgradeable soldeer deps 5.6.1 → 5.7.0, sweeps the versioned import prefixes across src/test/script, regenerates the candidate pointers to a fixpoint, and records the result in the CHANGELOG.

The byte-level answer this PR exists to give

  • Governance timelock: byte-identical. testTimelockPinsMatchCompiledDependency passes unchanged against the 5.7.0 dependency — the frozen TIMELOCK_CREATION_CODE / TIMELOCK_RUNTIME_CODEHASH pins (and therefore the three live deployments) are reproduced exactly. Independently cross-checked by compiling both tags standalone under the repo's exact profile: identical 8,149-byte creation code, identical runtime keccak 0xb623…6993.
  • Exactly one contract's bytecode moves: StoxWrappedTokenVault. 5.7.0's ERC4626Upgradeable swaps its private _tryGetAssetDecimals for the shared SafeERC20.tryGetDecimals helper. The candidate pointer regeneration cascades through everything embedding the vault's Zoltu address: its beacon, the beacon-set deployer, the unified deployer, and the orchestrator pair. Frozen release-tag snapshots are untouched — nothing deployed changes until a release is cut, at which point this is a new-tag event per the versioning rules.
  • Everything else (receipt vault, receipt, authoriser machinery, deployers on the receipt side) compiles byte-identical.

Reviewer decision

rain-vats 0.1.6 still imports @openzeppelin-contracts-5.6.1/ prefixes internally, so two remappings.txt lines bridge those onto the 5.7.0 install (same class of bridge as the existing @openzeppelin/contracts/ line, documented in the CHANGELOG; soldeer regenerating the file would need them re-applied). The alternative is waiting for rain-vats to republish against 5.7.0 and bumping in lockstep — this PR takes the bridge; call it out if you'd rather wait.

QA

  • Discriminating tests: testCandidateSelfConsistent — fails on base source combined with this branch's regenerated pointers, and was observed failing live on this branch before the pointer fixpoint (candidate constants vs 5.7.0 compile mismatch); testTimelockPinsMatchCompiledDependency deliberately does NOT discriminate — its passing under 5.7.0 IS the byte-identity claim.
  • Mutations applied: reverting any regenerated pointer constant to its 5.6.1 value → killed by testCandidateSelfConsistent (observed directly: the pre-fixpoint tree, where the beacon pointer still carried the 5.6.1-era embedded vault address, failed exactly there with the mismatched bytecode in the assertion output). Dep-version line itself: reverting foundry.toml to 5.6.1 alone → build breaks on the swept import prefixes (compile-time kill).
  • Oracle: the compiled artifacts of the version-locked OZ deps under the repo's single [profile.default] (solc 0.8.25, optimizer 2000, cancun, no metadata) — pointer expectations come from the compiler over the dependency, never hand-written; for the timelock additionally the three live on-chain deployments the frozen pins describe.
  • Category check: no linked issue — scope is the bump itself: both OZ deps moved together, import sweep verified grep-zero on old prefixes (sole survivor is the frozen-pin provenance doc, deliberate), pointer cascade regenerated to fixpoint (3 passes), CHANGELOG entry added.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Updates

    • Upgraded OpenZeppelin Contracts and Upgradeable Contracts to version 5.7.0.
    • Documented resulting bytecode and deployment address changes, while preserving timelock configuration pins.
    • Added compatibility guidance for remaining legacy imports.
  • Documentation

    • Clarified deployment table handling: extra canonical rows are supported, while shorter or misaligned tables now revert with dedicated errors.

The only production bytecode this moves is StoxWrappedTokenVault: 5.7.0's
ERC4626Upgradeable swaps its private _tryGetAssetDecimals for the shared
SafeERC20.tryGetDecimals helper. The candidate pointers regenerate to a
fixpoint, cascading through everything that embeds the vault's Zoltu
address: its beacon, the beacon-set deployer, the unified deployer and the
orchestrator pair. Frozen release-tag snapshots are untouched; nothing
deployed changes until a release is cut.

Everything else compiles byte-identical under 5.7.0 — in particular the
governance timelock: testTimelockPinsMatchCompiledDependency passes
unchanged against the 5.7.0 dependency, proving the frozen
TIMELOCK_CREATION_CODE / TIMELOCK_RUNTIME_CODEHASH pins (and therefore the
three live deployments) are exactly reproduced by the new version.

rain-vats 0.1.6 still imports @openzeppelin-contracts-5.6.1/ prefixes
internally; two remappings.txt bridge lines point those at the 5.7.0
install so exactly one OZ copy compiles (same class of bridge as the
existing @openzeppelin/contracts/ line; re-apply if soldeer regenerates
the file) until rain-vats republishes against 5.7.0.

Bump-protocol suites all green: LibERC20Storage + LibERC1155Storage
(ERC-7201 layout pins), LibStockSplit, LibRebase sequential precision,
LibTotalSupply fuzz, LibTimelockInvariants, testCandidateSelfConsistent.
StoxReceiptVault runtime 24,058 bytes (518 under EIP-170).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@thedavidmeister thedavidmeister self-assigned this Aug 11, 2026
@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 639cc727-a04f-4a95-942e-a0f3e0a36f59

📥 Commits

Reviewing files that changed from the base of the PR and between 67fcd4b and ac6d5b6.

⛔ Files ignored due to path filters (7)
  • soldeer.lock is excluded by !**/*.lock
  • src/generated/candidate/ST0xOrchestrator.pointers.sol is excluded by !**/generated/**
  • src/generated/candidate/ST0xOrchestratorBeaconSetDeployer.pointers.sol is excluded by !**/generated/**
  • src/generated/candidate/StoxUnifiedDeployer.pointers.sol is excluded by !**/generated/**
  • src/generated/candidate/StoxWrappedTokenVault.pointers.sol is excluded by !**/generated/**
  • src/generated/candidate/StoxWrappedTokenVaultBeacon.pointers.sol is excluded by !**/generated/**
  • src/generated/candidate/StoxWrappedTokenVaultBeaconSetDeployer.pointers.sol is excluded by !**/generated/**
📒 Files selected for processing (84)
  • CHANGELOG.md
  • CLAUDE.md
  • foundry.toml
  • remappings.txt
  • script/20260619-deploy-v4-authoriser-clone.s.sol
  • script/20260623-upgrade-receipt-vaults-to-v4.s.sol
  • script/20260706-deploy-tokens-ethereum.s.sol
  • script/20260716-migrate-beacon-owners-ethereum.s.sol
  • script/20260722-migrate-beacon-owners-hyperevm.s.sol
  • script/20260722-swap-remaining-vault-authorisers.s.sol
  • script/20260722-swap-rklb-authoriser.s.sol
  • script/20260723-provision-additional-service-signer.s.sol
  • script/20260729-deploy-governance-timelock.s.sol
  • script/20260729-migrate-governance-to-timelock.s.sol
  • script/20260807-deploy-missing-tokens.s.sol
  • script/20260810-revoke-fireblocks-service-signer.s.sol
  • script/MigrateBeaconOwners.s.sol
  • src/concrete/ST0xOrchestrator.sol
  • src/concrete/StoxReceipt.sol
  • src/concrete/StoxReceiptVault.sol
  • src/concrete/StoxWrappedTokenVault.sol
  • src/concrete/StoxWrappedTokenVaultBeacon.sol
  • src/concrete/deploy/ST0xOrchestratorBeaconSetDeployer.sol
  • src/concrete/deploy/StoxUnifiedDeployer.sol
  • src/concrete/deploy/StoxWrappedTokenVaultBeaconSetDeployer.sol
  • src/interface/IST0xVaultBeaconSet.sol
  • src/lib/LibAuthoriserInvariants.sol
  • src/lib/LibBeaconInvariants.sol
  • src/lib/LibSafeOps.sol
  • src/lib/LibTimelockInvariants.sol
  • test/concrete/MockERC20.sol
  • test/script/20260619-deploy-v4-authoriser-clone.t.sol
  • test/script/20260623-upgrade-receipt-vaults-to-v4.t.sol
  • test/script/20260706-deploy-tokens-ethereum.t.sol
  • test/script/20260723-provision-additional-service-signer.prod.t.sol
  • test/script/20260723-provision-additional-service-signer.t.sol
  • test/script/20260729-migrate-governance-to-timelock.t.sol
  • test/script/20260807-deploy-missing-tokens.t.sol
  • test/script/20260810-revoke-fireblocks-service-signer.prod.t.sol
  • test/script/20260810-revoke-fireblocks-service-signer.t.sol
  • test/src/concrete/InvariantVault.sol
  • test/src/concrete/Mock1271.sol
  • test/src/concrete/ST0xOrchestrator.t.sol
  • test/src/concrete/StoxCorporateActionsFacet.authorizerIntegration.t.sol
  • test/src/concrete/StoxReceipt.t.sol
  • test/src/concrete/StoxReceiptRebaseIntegrationTest.t.sol
  • test/src/concrete/StoxReceiptVault.setAuthorizerGuard.t.sol
  • test/src/concrete/StoxReceiptVault.t.sol
  • test/src/concrete/StoxReceiptVaultMigrationIntegrationTest.t.sol
  • test/src/concrete/StoxWrappedTokenVault.t.sol
  • test/src/concrete/StoxWrappedTokenVaultBeacon.t.sol
  • test/src/concrete/StoxWrappedTokenVaultV1.prod.base.t.sol
  • test/src/concrete/TestStoxReceiptVault.sol
  • test/src/concrete/authorize/StoxOffchainAssetReceiptVaultAuthorizerV1.initializeGuard.t.sol
  • test/src/concrete/authorize/StoxOffchainAssetReceiptVaultAuthorizerV1.t.sol
  • test/src/concrete/authorize/StoxOffchainAssetReceiptVaultPaymentMintAuthorizerV1.corporateActionPairingGap.t.sol
  • test/src/concrete/authorize/StoxOffchainAssetReceiptVaultPaymentMintAuthorizerV1.t.sol
  • test/src/concrete/deploy/BeaconOwnerMigrationPin.t.sol
  • test/src/concrete/deploy/GovernanceTimelockMigration.t.sol
  • test/src/concrete/deploy/ST0xOrchestratorBeaconSetDeployer.t.sol
  • test/src/concrete/deploy/StoxCrossChainParity.t.sol
  • test/src/concrete/deploy/StoxProdV2.t.sol
  • test/src/concrete/deploy/StoxProdV4.t.sol
  • test/src/concrete/deploy/StoxUnifiedDeployer.ierc165.t.sol
  • test/src/concrete/deploy/StoxUnifiedDeployer.prod.base.t.sol
  • test/src/concrete/deploy/StoxWrappedTokenVaultBeaconSetDeployer.ierc165.t.sol
  • test/src/concrete/deploy/StoxWrappedTokenVaultBeaconSetDeployer.t.sol
  • test/src/concrete/integration/BurnAfterForwardSplit.t.sol
  • test/src/concrete/integration/BurnFractionalSplitTruncationDust.t.sol
  • test/src/concrete/integration/BurnHappyPath.t.sol
  • test/src/concrete/integration/BurnInfoAuditTrail.t.sol
  • test/src/concrete/integration/CertificationLapse.t.sol
  • test/src/concrete/integration/GuardHaltsAfterVaultBeaconUpgrade.t.sol
  • test/src/concrete/integration/MintWithEcdsaSignature.t.sol
  • test/src/concrete/integration/OrchestratorIntegrationTest.sol
  • test/src/concrete/integration/ReceiptTransferInLowersPointer.t.sol
  • test/src/concrete/upgrade/V3UpgradeShadowFork.t.sol
  • test/src/lib/LibAuthoriserInvariants.t.sol
  • test/src/lib/LibBeaconInvariants.t.sol
  • test/src/lib/LibProdTokenConfig.t.sol
  • test/src/lib/LibTimelockInvariants.t.sol
  • test/src/lib/LibTokenInvariants.addresses.t.sol
  • test/src/lib/TestERC1155.sol
  • test/src/lib/TestERC20.sol

Included review availability: Your plan includes up to 1 review per rolling hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The project now targets OpenZeppelin 5.7.0. Configuration, remappings, production imports, deployment scripts, tests, upgrade notes, and deploy-table documentation were updated.

Changes

OpenZeppelin dependency upgrade

Layer / File(s) Summary
Dependency configuration and documentation
foundry.toml, remappings.txt, CLAUDE.md, CHANGELOG.md
Dependency references now target OpenZeppelin 5.7.0. Compatibility aliases and upgrade notes were added. Changelog entries document bytecode, address, timelock, remapping, and deploy-table details.
Production imports and deployment scripts
src/concrete/*, src/interface/*, src/lib/*, script/*
Production contracts, interfaces, libraries, and deployment scripts now import OpenZeppelin 5.7.0.
Test import alignment
test/concrete/*, test/script/*, test/src/*
Mocks and tests now import OpenZeppelin 5.7.0. Test logic remains unchanged.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to ac6d5

This dependency update is merge-ready after normal checks and review; no actionable merge-blocking risk remains.

Possibly related PRs

Suggested reviewers: hardyjosh

Poem

A rabbit checks each import line,
“Five-seven-zero” now shines.
Remappings bridge the older trail,
Tests and scripts match without fail.
Bytecode notes hop into place.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the dependency upgrade and the limited bytecode impact on StoxWrappedTokenVault.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/bump-oz-5-7-0

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

baku-ccron and others added 2 commits August 16, 2026 17:17
# Conflicts:
#	src/lib/LibBeaconInvariants.sol
`forge fmt` had never been run over the regenerated
`src/generated/LibProdDeployCurrent.sol` and
`src/generated/LibProdDeployV4.sol`, which reddened both `git-clean`
(regenerates pointers, runs `forge fmt`, asserts an empty `git diff`) and
`rainix-sol / static` (`forge fmt --check`). Single cause, both checks.

Also sweeps the `@openzeppelin-contracts{,-upgradeable}-5.6.1/` import
prefixes in the governance-timelock and fireblocks-revoke scripts/tests
that landed on main after this branch was cut. These already resolved to
the 5.7.0 install via the remappings.txt bridge, so the sweep is a
compiler no-op; it restores the branch's grep-zero-on-old-prefixes claim.

CLAUDE.md: point the dependency list and bump runbook at 5.7.0, and
document the two version-bridge lines in remappings.txt. The bridge note
records what was observed locally -- soldeer install PRESERVES the
hand-added lines; it does not drop them.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@thedavidmeister thedavidmeister added the ai:design AI vetter: raises a design question label Aug 16, 2026
@thedavidmeister

Copy link
Copy Markdown
Contributor Author

🤖 ai:producer
Design-question: Static is still red at ac6d5b6 and I could not establish why, so I am routing the one thing here that needs a human ruling rather than guessing.

WHAT IS FIXED (verified)

  • The DIRTY conflict is resolved: origin/main (75 commits) merged in. Sole conflict was src/lib/LibBeaconInvariants.sol - this branch bumped the OZ import prefix, main added a LibMigrationInvariant import; both kept.
  • git-clean is GREEN. Its cause was that src/generated/LibProdDeployCurrent.sol and src/generated/LibProdDeployV4.sol were committed unformatted. Locally, forge fmt named exactly those two files, and the full CI sequence (soldeer install -> BuildPointers -> fmt -> git diff --exit-code) now exits 0 and is idempotent. BuildPointers regenerated NO pointer content, so the bump needs no pointer changes beyond those already committed.

THE DESIGN QUESTION: which Solidity toolchain is canonical?
This repo runs its two Solidity checks under two different, mutually inconsistent toolchains:

  • .github/workflows/git-clean.yaml: nix develop github:rainlanguage/rainix#sol-shell - UNPINNED, tracks rainlanguage/rainix main.
  • .github/workflows/rainix-sol.yaml (the static job): the rainix reusable workflow, which runs nix develop -c rainix-sol-static against THIS repo flake. flake.nix inputs github:rainPROTOCOL/rainix, and flake.lock pins rev 8603a225676b3d4d6d7cd0e41ae8918aa2ee4bf5 - a different GitHub owner, and a rev old enough that it provides no sol-shell output at all (nix develop github:rainprotocol/rainix/8603a225...#sol-shell errors with "does not provide attribute devShells.x86_64-linux.sol-shell").

The pipeline own tooling already refuses this: pr-review-report sol-toolchain exits 3 on this checkout with "this checkout own push/PR checks run 2 different Solidity toolchains ... A forge fmt that satisfies one can fail another, so there is no single answer to give."

I formatted with git-clean toolchain. git-clean went green; static did not. Whether static residual failure is a fmt disagreement between the two forge builds, or an unrelated slither finding, I DID NOT VERIFY - see below. Either way the two-toolchain split is a real defect that makes "format so both checks pass" unanswerable, and choosing between (a) bumping flake.lock to rainlanguage/rainix main or (b) pinning git-clean.yaml to flake.lock rainix rev is a repo-owner call, not mine.

WHY I DID NOT ESTABLISH THE STATIC CAUSE (tooling gaps, not choices)

  1. Reading the failing job log needs gh run view --log-failed; the permission system denied it, and pr-review-report has NO log-reading subcommand. That is a genuine gap - await names WHICH check failed but never WHY.
  2. Local reproduction of nix develop -c rainix-sol-static stalled indefinitely downloading a multi-GB dev-shell closure (chromium, gtk3, ffmpeg) and never reached slither.

Nothing about the static failure is asserted here beyond the observed fact that it is FAILURE at ac6d5b6 while test, legal, build-artifact and git-clean pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai:design AI vetter: raises a design question

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant